.data
a: .long 1
b: .long 1
c: .long 1
d: .long 1
e: .long 1
f: .long 1
g: .long 1
h: .long 1
i: .long 16
j: .long 1

output: .string "%d\n"

.text
.globl main
main:
movl i, %eax
pushl %eax

// a+b
movl a, %eax
addl b, %eax

// g+c
movl g, %ebx
addl c, %ebx

// (a+b)*(g+c)
cltd
imull %ebx

// i-(a+b)*(g+c)
popl %ebx
subl %eax, %ebx
pushl %ebx


// h*e
movl h, %eax
movl e, %ebx
cltd
imull %ebx
pushl %eax

// f+j
movl f, %ebx
addl j, %ebx

// (f+j)*d
movl d,%eax
cltd
imull %ebx

// ((f+j)*d)+(h*e)
popl %ebx
addl %ebx, %eax

// (i-(a+b)*(g+c))/(((f+j)*d)+(h*e))
movl %eax, %ebx
popl %eax
cltd
idivl %ebx


// Ausgabe
pushl %eax
pushl $output

call printf
addl $8, %esp
